<?php

# User session management
require('includes/user_manage.php');
?>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
	<meta name="keywords" content="salud cosmética natural aloe vera avena propolis baba de caracol tratamiento acne granos borbulhas rojeces marcas manchas psoriasis eccemas hidratar nutrir cara rejuvenecimiento cutáneo anti envejecimiento" />
	<meta name="description" content="Productos cosméticos y cremas naturales para dar belleza a la piel y el cuerpo. Utilizamos plantas cómo el áloe vera, esencias de la naturaleza y productos de la colmena." />
	<meta name="robots" content="all" />
	<title>Cosmética Natural</title>
	<link rel="stylesheet" type="text/css" href="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder.$server->my_site[0]->style; ?>"/>
	<link rel="icon" type="image/png" href="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder; ?>images/cosmetic.png"/>
	<!-- Inicio. Codigo javascript para el carrito de la compra -->
	<script type="text/javascript" src="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder.$server->my_site[0]->js; ?>catalog.js"></script>
	<script type="text/javascript" src="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder.$server->my_site[0]->js; ?>cart.js"></script>
	<?php if ($user->isAdmin) { ?>
	<script type="text/javascript" src="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder.$server->my_site[0]->js; ?>catalog_admin.js"></script>
	<?php } else { ?>
	<script type="text/javascript" src="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder.$server->my_site[0]->js; ?>catalog_order.js"></script>
	<?php } ?>
	<script type="text/javascript" src="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder.$server->my_site[0]->js; ?>cookies.js"></script>
	<script type="text/javascript" src="<?php echo $server->my_site[0]->path.$server->my_site[0]->folder.$server->my_site[0]->js; ?>ajax.js"></script>
	<!-- Fin. Codigo javascript para el carrito de la compra -->
</head>
<body>
<table id="background">
    <tr>
	<td>

<table id="maincontent">
    <tr>
	<th class="header">
		<?php include($server->get_path_name('top.php')); ?>
	</th>
    </tr>

    <tr>
	<td>
	<table>
	    <tr>
		<td id="left_menu">
			<?php
				if ($user->isAdmin) { 
					include($server->get_path_name('lmenu_admin.php'));
				}
				else {
					include($server->get_path_name('lmenu.php'));
				}
			?>
		</td>
		<td class="centercolumn">
		   <table class="centercolumn">
			<tr>
			    <td class="height">
				<div class="backgroundleft">
				    <div class="backgroundright">
					    <div id="rightContentBox">
						<?php
							//Just in case the xml http request is not working other way this section will be activated by js
							if (isset($_SERVER['HTTP_USER_AGENT']) && $server->bot_detect($_SERVER['HTTP_USER_AGENT'])) {
								if (isset($_GET[ "section" ])) include($server->get_path_name($_GET[ "section" ] . '.php'));
								else include($server->get_path_name('default.php'));
							}
						?>
					    </div>
				    </div>
				</div>
			    </td>
			</tr>
			<tr>
			    <td>
				<table class="bottom">
				    <tr>
					<td class="left">

					</td>

					<td class="center">

					</td>

					<td class="right">
					</td>
				    </tr>
				</table>

				<table class="shadow">
				    <tr>
					<td class="left">
					</td>

					<td class="center">
					</td>

					<td class="right">
					</td>
				    </tr>
				</table>

			    </td>
			</tr>
		    </table>
		</td>
		<td>
			<?php include($server->get_path_name('rmenu.php')); ?>
		</td>
	   </tr>
	</table>
	</td>
    </tr>
    <tr>
	<td style="height:20px;"></td>
    </tr>
</table>

	</td>
    </tr>
    <tr>
	<td class="footer">
		<?php include($server->get_path_name('bottom.php')); ?>
	</td>
    </tr>
</table>
<script type="text/javascript">
	setViewTo("?section=default","rightContentBox");
</script>
</body>
</html>
